package com.haixiaoke.saas.repository.electronicVisa.pojo;

import com.fasc.open.api.v5_1.req.signtask.AddFillFieldInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.haixiaoke.saas.repository.pojo.OrgElectronicVisa;
import com.tencentcloudapi.essbasic.v20210526.models.FormField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 *
 * 企业电子签合同对象
 *
 * @author qixi
 * @date 2023/12/23
 */
@Data
public class ElectronicVisaContract {

    /**
     * 房屋id
     */
    @NotNull(message = "房屋id不能为空")
    private String houseId;

    /**
     * 模板id
     */
    private String templateId;


    /**
     * 签署人姓名
     */
    private String name;

    /**
     * 签署人手机号
     */
    private String mobile;

    /**
     * 签署人身份证号
     */
    private String idCard;


    /**
     * 发起人用户id
     */
    private String operatorId;

    /**
     * 企业电子签信息
     */
    private OrgElectronicVisa orgElectronicVisa;


    /**
     * 合同控件信息
     */
    private FormField[] formFields;

    /**
     * 合同id
     */
    @NotNull(message = "合同id不能为空")
    private Long contractId;

    /**
     * 合同组件内容
     */
    private List<AddFillFieldInfo> fillFieldList;

    /**
     * 合同任务截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY )
    private Date expiresTime;


}
